#ifndef __losor_preprocessor_h__
#define __losor_preprocessor_h__

#include <list.h>
#include <map.h>
#include "expression.h"

#ifdef __cplusplus
extern "C" {
#endif


    typedef struct _ppoutput
    {
        list *tokens;
        list *comments;
        list *errors;
        smap *symbols;
        smap *types;
        list *ppcond;
    } ppoutput;
    
    typedef struct _code
    {
        char *file;
        uint32 line;
        uint8 *code_buf;
    } code ;

    // decide to drop this feature
    int32 pp_universal( code* cd, ppoutput *out );
    // decide to drop this feature
    int32 pp_number( code* ci );
    // we do not use this function
    int32 pp_header_name( code* cd, ppoutput *out );

    int32 pp_identify( code* cd, ppoutput *out );
    int32 pp_integer( code* cd, ppoutput *out );
    int32 pp_floating( code* cd, ppoutput *out );
    int32 pp_character( code* cd, ppoutput *out );
    int32 pp_string( code* cd, ppoutput *out );
    int32 pp_punctuator( code* cd, ppoutput *out );
    int32 pp_comment( code* cd, ppoutput *out );
    int32 pp_space( code* cd, ppoutput *out );
    int32 pp_if( code* cd, ppoutput *out );
    int32 pp_define( code* cd, ppoutput *out );
    int32 pp_other_directive( code* cd, ppoutput *out );
    int32 pp_token( code* cd, ppoutput *out );
    int32 preprocess( code* cd, ppoutput *out );

#ifdef __cplusplus
};
#endif

#endif // __losor_preprocessor_h__
